﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void submit_Click(object sender, EventArgs e)
        {
            Student s1 = new Student();
            s1.Name = textBoxName.Text;
            s1.Age = int.Parse(textBoxAge.Text);
            if (CheckBoxSex.GetItemChecked(0))
            {
                s1.Sex = "Man";
            }
            else
            {
                s1.Sex = "Woman";
            } 
            MessageBox.Show(s1.ToString());
        }

        private void textBoxName_TextChanged(object sender, EventArgs e)
        {

        }

        private void CheckBoxSex_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}
